<div class="panel panel-default">
    <div class="panel-heading">Server Info</div>
    <div class="panel-body">
        <div class="form-group">
            <label>
                <strong>Server Addr:</strong>
                {{server.addr}}
            </label>
        </div>
        <div class="form-group">
            <label>
                <strong>Server CheckPath:</strong>
                {{server.checkPath}}
            </label>
        </div>
        <div class="form-group">
            <label>
                <strong>Server CheckResponsedBody:</strong>
                {{server.checkResponsedBody}}
            </label>
        </div>
        <div class="form-group">
            <label>
                <strong>Server CheckTimeout:</strong>
                {{server.checkTimeout}}
            </label>
        </div>
        <div class="form-group">
            <label>
                <strong>Server CheckDuration:</strong>
                {{server.checkDuration}}
            </label>
        </div>

        <div class="form-group">
            <label for="serverMaxQPS">Server Max QPS</label>
            <input type="number" class="form-control" ng-model="server.maxQPS" id="serverMaxQPS" placeholder="max qps, reject when over"/>
        </div>

        <div class="form-group">
            <label for="serverHalfToOpen">Server Half To Open Seconds</label>
            <input type="number" class="form-control" ng-model="server.halfToOpenSeconds" id="serverHalfToOpen"  placeholder="wait seconds, half to open, default 300 sec"/>
        </div>

        <div class="form-group">
            <label for="serverHalfTrafficRate">Server Half Traffic Rate</label>
            <input type="number" class="form-control" ng-model="server.halfTrafficRate" id="serverHalfTrafficRate" placeholder="Server Half Traffic Rate"/>
        </div>

        <div class="form-group">
            <label for="serverHalfToOpenSucceedRate">Server close to half: succeed rate</label>
            <input type="number" class="form-control" ng-model="server.halfToOpenSucceedRate" id="serverHalfToOpenSucceedRate" placeholder="how succeed request rate in last HalfToOpenCollectSeconds, when server to normal status"/>
        </div>

        <div class="form-group">
            <label for="serverHalfToOpenCollectSeconds">Server close to half: collect seconds</label>
            <input type="number" class="form-control" ng-model="server.halfToOpenCollectSeconds" id="serverHalfToOpenCollectSeconds" placeholder="how failure request rate in last HalfToOpenCollectSeconds, when server to normal status"/>
        </div>

        <div class="form-group">
            <label for="serverOpenToCloseFailureRate">Server open to close: failure rate</label>
            <input type="number" class="form-control" ng-model="server.openToCloseFailureRate" id="serverOpenToCloseFailureRate" placeholder="how failure request rate in last OpenToCloseCollectSeconds, when server to circuit breaken"/>
        </div>

        <div class="form-group">
            <label for="serverOpenToCloseCollectSeconds">Server open to close: collect seconds</label>
            <input type="number" class="form-control" ng-model="server.openToCloseCollectSeconds" id="serverOpenToCloseCollectSeconds" placeholder="how failure request rate in last OpenToCloseCollectSeconds, when server to circuit breaken"/>
        </div>

        <button type="button" class="btn btn-default" ng-click="update()">Update</button>
    </div>
</div>

<div class="table-responsive">
    <table class="table table-bordered table-striped">
        <thead>
        <tr>
            <th>Name</th>
            <th>Unbind</th>
        </tr>
        </thead>

        <tbody>
            <tr ng-repeat="cluster in server.bindClusters">
                <td>
                    <a href="#/clusters/{{cluster}}">{{cluster}}</a>
                </td>
                <td>
                    <button type="button" class="btn btn-default btn-sm" ng-click="unbind(server.addr, cluster)">UnBind</button>
                </td>
            </tr>
        </tbody>
    </table>
</div>